# -*- coding: utf-8 -*-
from airflow.sensors.date_time_sensor import DateTimeSensor
from datetime import timedelta
from airflow.models.variable import Variable



is_pro_env = Variable.get(key='env', default_var='').upper() == 'PRO'

time_after_07_30 = DateTimeSensor(
    task_id='time_after_07_30',
    pool='default_pool',
    target_time='{{ execution_date | date_add(1) | cst_ds }}T07:30:00+08:00',
    retries=0,
    mode='poke',
    execution_timeout=timedelta(hours=8),
    email=['yl_bigdata@yl-scm.com','time_sensor@yl-scm.com'],
)
